<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>消息 - 会员中心 -  {:C('YTATA_SITE_NAME')}</title>
<link href="__ROOT__/{:C('YTATA_TPL_DIR')}/public/css/user.css" rel="stylesheet" type="text/css">
<include file="public:header" />
<div class="usermain">
  <div class="mleft">
<include file="left_nav" />
  </div>
  
  <div class="mright">
  
    
	
    <div class="mbox">
	  	<div class="utopt">
			  <div class="tit">消息</div>
			  <a class="snav select" href="{:RU('user/msg')}">系统消息</a>
			  <a class="snav "       href="{:RU('user/pms')}">私信</a>
 

 

			<div class="clear"></div>
	  </div>
	  
	 
	 
	  
	    <div class="mymsg">
		
		
		<div class="tnav link_gray3">
		  <a href="{:RU('user/msg',array('read'=>''))}" <eq name="read" value="">class="select"</eq>>全部</a>
		  <span>|</span>
		  <a href="{:RU('user/msg',array('read'=>'0'))}" <eq name="read" value="0">class="select"</eq>>未读</a>
		  <span>|</span>
		  <a href="{:RU('user/msg',array('read'=>'1'))}" <eq name="read" value="1">class="select"</eq>>已读</a></div>
		  
		  
<volist name="msg.list" id="li">
			<div class="msglist">
		 
			  <div class="td1">
			 
			<img src="{$li.sysimg}">
			<div class="is_read" <eq name="li.read" value="0">style="display:block"</eq>></div>
			 
			</div>
			  
					<div class="td2">
					  <div class="tit link_gray3">
					  <div class="sys"><a href="{$li.url}">系统消息</a></div>
					  </div>
					   <div class="msg"><span class="time">{$li.addtime_str}</span>
			
						{$li.msg}
					   
					   </div>
					</div>
					 
			  <div class="td3">
					
	 
				<div class="btn_white btn_border btn_inline_small J_isread " id="{$li.id}">
				<eq name="li.read" value="0">设已读<else/>设未读</eq>
				</div>
			    <a class="btn_white btn_border btn_inline_small" href="{:RU('user/msg_del',array('id'=>$li['id']))}" onClick="return confirm('你确定要删除吗？')" >删除</a>				</div>
					<div class="clear"></div>
			</div>
 </volist>
<empty name="msg.list">
<div class="infoempty"> 暂时木有内容呀～～</div>
</empty>
 <!-- -->
 <!-- -->
 <div class="uupage">{$msg.page}</div>
 
 
  
	
		  
		</div>
	    
					
		
		
    </div>
	
	 
	
	
  </div>
   <div class="clear"></div>
</div>
<include file="public:footer" />
 <script type="text/javascript">
    $(document).ready(function()
    {	
        //点击删除   
        $(".J_isread").click(function(){
            btn=$(this);
			id=btn.attr('id');
			 $.getJSON(ajaxURL,{ act: "ajax_msg_read",id:id}, function(json){
						if (json.status==0){
							disapperTooltip("remind", json.content);
						}else if (json.status==1){
						disapperTooltip("success",json.content);
						if ($.trim(btn.text())=='设未读')	{
						btn.text('设已读');
						btn.parent().parent().find(".is_read").toggle();
						}else{
						btn.text('设未读');
						btn.parent().parent().find(".is_read").toggle();
						}
						}else{
							disapperTooltip("remind","未知错误");
						}
			});
        });
		 
		 
		
		 
		
    });
</script>
</body>
</html>
